const Koa = require('koa')
const app = new Koa()
const router = require('koa-router')()

router.get('/home', async (ctx, next) => {
  console.log(ctx.request.query)
  console.log(ctx.request.querystring)
})

router.get('/about/:id/:name', async (ctx, next) => {
  console.log(ctx.params);
})

app.use(router.routes())

app.listen(3000, () => {
  console.log('server is running at http://localhost:3000')
})